home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 …SCII & the Runetime Code / ADC Developer CD (1992-07) (''Butch ASCII And The Runtime Code'')_iso / Dev.CD 199207.iso / Tools & Apps / Devices & Hardware / A⁄ROSE / FileManager / FileTask.h < prev    next >
Encoding:
Text File  |  1991-06-18  |  2.4 KB  |  66 lines  |  [TEXT/MPS ]

  1. /********************************************************************************/
  2. /*                                                                                */
  3. /*        FileTask.h - A/ROSE file system defines.                                */
  4. /*                                                                                */
  5. /*        Richard W. Mincher.  December 20, 1989.                                    */
  6. /*                                                                                */
  7. /*        Modified by Anumele D. Raja on June 17, 1991                            */
  8. /*                                                                                */
  9. /*        Copyright © 1989, 1990 Apple Computer, Inc.  All rights reserved.        */
  10. /*                                                                                */
  11. /********************************************************************************/
  12.  
  13. const char kFileSystemObjectName[] = "Prototype";
  14. const char kFileSystemTypeName[] = "FileSystem";
  15.  
  16. #define    FS_OPEN            0x1000
  17. #define    FS_OPENRF        0x1002
  18. #define    FS_READ            0x1004
  19. #define    FS_WRITE        0x1006
  20. #define    FS_GETFPOS        0x1008
  21. #define    FS_SETFPOS        0x100A
  22. #define    FS_GETEOF        0x100C
  23. #define    FS_SETEOF        0x100E
  24. #define    FS_ALLOCATE        0x1010
  25. #define    FS_CLOSE        0x1012            
  26. #define    FS_CREATE        0x1014
  27. #define    FS_DELETE        0x1016    
  28. #define    FS_GETFINFO        0x1018
  29. #define    FS_SETFINFO        0x101A
  30. #define    FS_SETFLOCK        0x101C
  31. #define    FS_RSTFLOCK        0x101E
  32. #define    FS_RENAME        0x1020
  33.                     
  34. #ifndef __FILES__
  35. struct FInfo {
  36.     unsigned long fdType;                    /*the type of the file*/
  37.     unsigned long fdCreator;                /*file's creator*/
  38.     unsigned short fdFlags;         /*flags ex. hasbundle,invisible,locked, etc.*/
  39.     unsigned short    h;
  40.     unsigned short    v;                /*file's location in folder*/
  41.     short fdFldr;                    /*folder containing file*/
  42. };
  43.  
  44. typedef struct FInfo FInfo;
  45.  
  46. //  A/ROSE File System Calls
  47.  
  48. short AFSOpen( char *fileName, short vRefNum, short *refNum );
  49. short AOpenRF( char *fileName, short vRefNum, short *refNum );
  50. short AFSRead( short refNum, long *count, char *buffPtr );
  51. short AFSWrite( short refNum, long *count, char *buffPtr );
  52. short AGetFPos( short refNum, long *filePos );
  53. short ASetFPos( short refNum, short posMode, long posOff );
  54. short AGetEOF( short refNum, long *logEOF );
  55. short ASetEOF( short refNum, long logEOF );
  56. short AAllocate( short refNum, long *count );
  57. short AFSClose( short refNum );
  58. short ACreate( char *fileName, short vRefNum, long creator, long fileType );
  59. short AFSDelete( char *fileName, short vRefNum );
  60. short AGetFInfo( char *fileName, short vRefNum, FInfo *fndrInfo );
  61. short ASetFInfo( char *fileName, short vRefNum, FInfo *fndrInfo );
  62. short ASetFLock( char *fileName, short vRefNum );
  63. short ARstFLock( char *fileName, short vRefNum );
  64. short ARename( char *oldName, short vRefNum, char *newName );
  65.  
  66. #endif